{include file="public/toper"/}
<style>
    .table_p {height: 20px;}
</style>
<div class="x-body">
    <table class="layui-table">
        <tr>订单信息</tr>
        <tr>
            <td>订单编号</td>
            <td>{$list['card_order_sn']}</td>
            <td>用户</td>
            <td>{$list['uname']}【<a id="sj">{$list['phone']}</a>】              <span id="xs">显示</span></td>
        </tr>
        <tr>
            <td>卡类型</td>
            <td>{if condition="$list['stype'] eq 0"}{:MCARD_TYPE0}{elseif condition="$list['stype'] eq 1"/}{:MCARD_TYPE1}{elseif condition="$list['stype'] eq 2"}{:MCARD_TYPE2}{elseif condition="$list['stype'] eq 3"}{:MCARD_TYPE3}{/if}</td>
            <td>有效期</td>
            <td>{$list.add_time|date="Y-m-d",###}至{$list.validity_time|date="Y-m-d",###}</td>
        </tr>
        <tr>
            <td>下单时间</td>
            <td>{$list['add_time']|date="Y-m-d H:i:s",###}</td>
            <td>支付时间</td>
            <td>{$list['pay_time']|date="Y-m-d H:i:s",###}</td>
        </tr>
        <tr>
            <td>订单金额</td>
            <td>{$list['order_amount']}</td>
            <td>实付金额</td>
            <td>{$list['pay_price']}</td>
        </tr>
        <tr>
            <td>推广渠道</td>
            <td>{if condition="$list['channel'] eq 0"}普通小程序用户{elseif condition="$list['channel'] eq 1"/}{$list['stores']['suname']}【{$list['stores']['sname']}】{elseif  condition="$list['channel'] eq 2"/}外埠渠道{elseif  condition="$list['channel'] eq 3"/}{$list['stores']}{/if}</td>
            <td>推广方式</td>
            <td>{if condition="$list['type'] eq 0"}线上{elseif condition="$list['type'] eq 1"/}线下{/if}</td>
        </tr>
        <tr>
            <td>订单状态</td>
            <td class="color">{if condition="$list['card_status'] eq 0"}未支付{elseif condition="$list['card_status'] eq 1"/}已支付{elseif  condition="$list['card_status'] eq 2"/}已取消{/if}</td>
            <td>免押额度</td>
            <td class="color">{$list.exempted_quota}</td>
        </tr>
        <tr>
            <td>佣金总额</td>
            <td class="color">{$list.total_commission}</td>
        </tr>
    </table>

    {if condition="$list['card_status'] eq 1"}
    <p class="table_p"></p>
    <table class="layui-table">
        <tr>支付信息</tr>
        <tr>
            <td>订单类型</td>
            <td>支付渠道</td>
            <td>交易码</td>
            <td>时间</td>
            <td>处理方式</td>
            <td>金额</td>
        </tr>
        <tr>
            <td>{if condition="$list['order_pay']['type'] eq 0"} 购买订单  {elseif condition="$list['order_pay']['type'] eq 1"/} 共享订单  {elseif  condition="$list['order_pay']['type'] eq 2"/}订制订单  {elseif  condition="$list['order_pay']['type'] eq 3"/}会员订单{/if}</td>
            <td>{$list['order_pay']['pay_channel']}</td>
            <td>{$list['order_pay']['pay_code']}</td>
            <td>{$list['order_pay']['time']|date="Y-m-d H:i:s",###}</td>
            {if condition="$list['order_pay']['pay_mode'] eq 1"} <td>人工</td>  {else /} <td>系统</td>{/if}
            <td>{$list['order_pay']['pay_price']}</td>
        </tr>
    </table>
    {/if}
</div>
<script>
    var phone = $('#sj').text();
    var nPhone = phone.substr(0, 3) + '****' + phone.substring(7, 11);
    $('#sj').text(nPhone);

    $("#xs").click(function(){
        var p = $('#sj').text();
        if(p.indexOf("***") >= 0 ) {
            $('#sj').text({$list['phone']});
            $('#xs').html('隐藏');
        }else {
            var nP = p.substr(0, 3) + '****' + p.substring(7, 11);
            $('#sj').text(nP);
            $('#xs').html('显示');
        }
    });
</script>
{include file="public/footer"/}